package com.hysf.ioc.pro1.test;

import com.hysf.ioc.pro1.pojo.Product;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class App3_Annotation {
	public static void main(String[] args) {
//		ApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);
		ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
		System.out.println(context.getBean("order"));
		System.out.println(context.getBeansOfType(Product.class));
		System.out.println(context.getBean("apple"));
	}
}
